package model

type Config struct {
	CustCount   CustCount
	DataBase    DataBase
	Yunyouqilu  Yunyouqilu
	Interval    Interval
	Log         Log
	PFlib       PFlib
	Active      Active
	Coefficient Coefficient
}
type Active struct {
	Active string `ini:"active"`
}
type Coefficient struct {
	In  int `ini:"in"`
	Out int `ini:"out"`
}
type PFlib struct {
	Username string `ini:"username"`
	Password string `ini:"password"`
	Database string `ini:"database"`
	Host     string `ini:"host"`
	Port     int    `ini:"port"`
}
type Interval struct {
	NewTicker int `ini:"NewTicker"`
}
type Log struct {
	LogLevel string `ini:"LogLevel"`
}
type CustCount struct {
	Url      string `ini:"url"`
	Key      string `ini:"key"`
	Cameraid string `ini:"cameraid"`
}

type DataBase struct {
	Host     string `ini:"host"`
	Port     string `ini:"port"`
	User     string `ini:"user"`
	Password string `ini:"password"`
}

type Yunyouqilu struct {
	BaseURL     string `ini:"baseURL"`
	Appkey      string `ini:"appkey"`
	Appsecret   string `ini:"appsecret"`
	LibraryName string `ini:"libraryName"`
	Notice      string `ini:"notice"`
}

// TokenResponse 包含获取access_token的响应数据
type TokenResponse struct {
	Status_code int       `json:"status_code"`
	Message     string    `json:"message"`
	TokenData   TokenData `json:"data"`
}

type TokenData struct {
	Access_token string `json:"access_token"`
	Token_type   string `json:"token_type"`
	Expires_in   int64  `json:"expires_in"`
}

// UploadDataRequest 包含上传数据的请求数据
type UploadDataRequest struct {
	Scenic_id         string `json:"scenic_id"`
	Scenic_status     int    `json:"scenic_status"`
	Notice            string `json:"notice"`
	Total_tourists    int    `json:"total_tourists"`
	Out_tourists      int    `json:"out_tourists"`
	Realtime_tourists int    `json:"realtime_tourists"`
	Request_time      int64  `json:"request_time"`
	Book_list         []struct {
		Label      string `json:"label"`
		StartTime  int64  `json:"start_time"`
		EndTime    int64  `json:"end_time"`
		Book_num   int    `json:"book_num"`
		Remain_num int    `json:"remain_num"`
	} `json:"book_list"`
}

// UploadDataResponse 包含上传数据的响应数据
type UploadDataResponse struct {
	Status_code int    `json:"status_code"`
	Message     string `json:"message"`
}

type CustCountResponse struct {
	HistoryIn int `json:"historyIn"`
	TodayOut  int `json:"todayOut"`
	YearIn    int `json:"yearIn"`
	TodayIn   int `json:"todayIn"`
}

type ScenicResponse struct {
	Status_code int          `json:"status_code"`
	Message     string       `json:"message"`
	Data        []ScenicData `json:"data"`
}

type ScenicData struct {
	ScenicID    string `json:"scenic_id"`
	NameCN      string `json:"name_cn"`
	Address     string `json:"address"`
	CityName    string `json:"cityname"`
	DefaultPic  string `json:"defaultphoto"`
	PerLink     string `json:"perlink"`
	CompressPic string `json:"compresspic"`
}
